#!/usr/bin/perl -w
use strict;

print "Content-Type: text/html\n\n";
print "<pre>You Ask\n";

use DBI;
our $h=DBI->connect('DBI:mysql:database=Down','root') || die $DBI::errstr;
$_=join ',',@ARGV;
s/[^\d,]//g;s/,{2,}/,/g;s/^,//;s/,$//;
exit unless $_;
$h->do(qq/update down set status=2 where status=0 and id in ($_)/);
$h->disconnect();

print <<EOF;
<b>$_</b>
</pre>
Finish
EOF
